// assignment //

var pathObj1 = {
    "pink_line1": {
        "strokepath": [
            {
                "path": "M 163.192 7.531 L -0.474 7.531",
                "duration": 200
            },
			{
                "path": "M 0.521 20.125 L 0.521 0",
                "duration": 200
            }
        ],
        "dimensions": {
            "width": 164,
            "height": 15
        }
    }
}; 

//practice//

var pathObj2 = {
    "pink_line2": {
        "strokepath": [
            {
                "path": "M 310 7.642 L 0 7.642",
                "duration": 200
            },
			{
                "path": "M 0.521 20.125 L 0.521 0",
                "duration": 200
            }
        ],
        "dimensions": {
			"width": 310,
            "height": 15
        }
    }
}; 

//study//

var pathObj3 = {
    "pink_line3": {
        "strokepath": [
            {
                "path": "M 435.192 7.531 L -0.474 7.531",
                "duration": 200
            },
			{
                "path": "M 0.521 20.125 L 0.521 0",
                "duration": 200
            }
        ],
        "dimensions": {
            "width": 444,
            "height": 15
        }
    }
}; 

//Test//

var pathObj4 = {
    "pink_line4": {
        "strokepath": [
            {
                "path": "M 0.172 7.563 L 160.797 7.563",
                "duration": 200
            },
			{
                "path": "M 160.521 20.125 L 160.521 0",
                "duration": 200
            }
        ],
        "dimensions": {
            "width": 162,
            "height": 15
        }
    }
}; 
//MySpace//

var pathObj5 = {
    "pink_line5": {
        "strokepath": [
            {
                "path": "M 0.172 7.563 L 281.797 7.563",
                "duration": 200
            },
			{
                "path": "M 281.521 20.125 L 281.521 0",
                "duration": 200
            }
        ],
        "dimensions": {
            "width": 283,
            "height": 15
        }
    }
}; 
//My group wall//
var pathObj6 = {
    "pink_line6": {
        "strokepath": [
            {
                "path": "M 0.172 7.563 L 440.797 7.563",
                "duration": 200
            },
			{
                "path": "M 440.521 20.125 L 440.521 0",
                "duration": 200
            }
        ],
        "dimensions": {
            "width": 442,
            "height": 15
        }
    }
}; 

$(document).ready(function(){ 
var allowed=true;
	$('#assignment').click(function(e){
		if(allowed)
		{
			allowed=false;
			$('#pink_line3').lazylinepainter('erase');
			$('#pink_line2').lazylinepainter('erase');
			$('#pink_line4').lazylinepainter('erase');
			$('#pink_line5').lazylinepainter('erase');
			$('#pink_line6').lazylinepainter('erase');
			$('#study_icon').lazylinepainter('erase');
			$('#practice_icon').lazylinepainter('erase');
			$('#assignment_icon').lazylinepainter('erase');
			$('#test_icon').lazylinepainter('erase');
			$('#myspace_icon').lazylinepainter('erase');
			$('#my_group_wall_icon').lazylinepainter('erase');
			$('#pink_line1').lazylinepainter( {
			"svgData": pathObj1,
			"strokeWidth": 2,
			"strokeColor": "#ec008c"
			}).lazylinepainter('paint');
			allowed=true;
		}
	});
	$('#practice').click(function(e){
		if(allowed)
		{
			allowed=false;
			$('#pink_line3').lazylinepainter('erase');
			$('#pink_line1').lazylinepainter('erase');
			$('#pink_line4').lazylinepainter('erase');
			$('#pink_line5').lazylinepainter('erase');
			$('#pink_line6').lazylinepainter('erase');
			$('#assignment_icon').lazylinepainter('erase');
			$('#study_icon').lazylinepainter('erase');
			$('#test_icon').lazylinepainter('erase');
			$('#myspace_icon').lazylinepainter('erase');
			$('#my_group_wall_icon').lazylinepainter('erase');
			 $('#pink_line2').lazylinepainter( 
			 {
				"svgData": pathObj2,
				"strokeWidth": 2,
				"strokeColor": "#ec008c"
			}).lazylinepainter('paint');
			allowed=true;
		}
	});
	$('#study').click(function(e){
		if(allowed)
		{
			allowed=false;
			$('#pink_line1').lazylinepainter('erase');
			$('#pink_line2').lazylinepainter('erase');
			$('#pink_line4').lazylinepainter('erase');
			$('#pink_line5').lazylinepainter('erase');
			$('#pink_line6').lazylinepainter('erase');
			$('#practice_icon').lazylinepainter('erase');
			$('#assignment_icon').lazylinepainter('erase');
			$('#test_icon').lazylinepainter('erase');
			$('#myspace_icon').lazylinepainter('erase');
			$('#my_group_wall_icon').lazylinepainter('erase');
			 $('#pink_line3').lazylinepainter( 
			 {
				"svgData": pathObj3,
				"strokeWidth": 2,
				"strokeColor": "#ec008c"
			}).lazylinepainter('paint'); 
			allowed=true;
		}
	});
	$('#test').click(function(e){
		if(allowed)
		{
			allowed=false;
			$('#pink_line3').lazylinepainter('erase');
			$('#pink_line2').lazylinepainter('erase');
			$('#pink_line1').lazylinepainter('erase');
			$('#pink_line5').lazylinepainter('erase');
			$('#pink_line6').lazylinepainter('erase');
			$('#practice_icon').lazylinepainter('erase');
			$('#study_icon').lazylinepainter('erase');
			$('#assignment_icon').lazylinepainter('erase');
			$('#myspace_icon').lazylinepainter('erase');
			$('#my_group_wall_icon').lazylinepainter('erase');	  
			 $('#pink_line4').lazylinepainter( 
			 {
				"svgData": pathObj4,
				"strokeWidth": 2,
				"strokeColor": "#ec008c"
			}).lazylinepainter('paint'); 
			allowed=true;
		}
	 });
	$('#myspace').click(function(e){
		if(allowed)
		{
			allowed=false;
			$('#pink_line3').lazylinepainter('erase');
			$('#pink_line2').lazylinepainter('erase');
			$('#pink_line1').lazylinepainter('erase');
			$('#pink_line4').lazylinepainter('erase');
			$('#pink_line6').lazylinepainter('erase');
			$('#practice_icon').lazylinepainter('erase');
			$('#study_icon').lazylinepainter('erase');
			$('#assignment_icon').lazylinepainter('erase');
			$('#test_icon').lazylinepainter('erase');
			$('#my_group_wall_icon').lazylinepainter('erase');		  
			 $('#pink_line5').lazylinepainter( 
			 {
				"svgData": pathObj5,
				"strokeWidth": 2,
				"strokeColor": "#ec008c"
			}).lazylinepainter('paint');
			allowed=true; 
		}
	 });
	$('#group_wall').click(function(e){	
	    if(allowed)
		{
			allowed=false;
			$('#pink_line3').lazylinepainter('erase');
			$('#pink_line2').lazylinepainter('erase');
			$('#pink_line1').lazylinepainter('erase');
			$('#pink_line5').lazylinepainter('erase');
			$('#pink_line4').lazylinepainter('erase');
			$('#practice_icon').lazylinepainter('erase');
			$('#study_icon').lazylinepainter('erase');
			$('#assignment_icon').lazylinepainter('erase');
			$('#myspace_icon').lazylinepainter('erase');
			$('#test_icon').lazylinepainter('erase');	  
			 $('#pink_line6').lazylinepainter( 
			 {
				"svgData": pathObj6,
				"strokeWidth": 2,
				"strokeColor": "#ec008c"
			}).lazylinepainter('paint'); 
			allowed=true;
		}
	 });
});